package com.gitee.feizns.web.ex;

import com.gitee.feizns.web.domain.result.Err;
import org.springframework.http.HttpStatus;

/**
 * @author feizns
 * @since 2019/7/4
 */
public class HttpException extends RuntimeException {

    private HttpStatus status;

    private Err err;

    public HttpException(HttpStatus status) {
        this.status = status;
    }

    public HttpException(HttpStatus status, String message) {
        super(message);
        this.status = status;
    }

    public HttpException(HttpStatus status, Err err) {
        this.status = status;
        this.err = err;
    }

    public HttpStatus getStatus() {
        return status;
    }

    public Err getErr() {
        return err;
    }

}
